export const showToast = (title, icon='none', duration=1000, mask=true) => {
  uni.showToast({
    title, icon, duration, mask
  })
}

export const formatDate = (dateStr) => {
  const year = dateStr.substring(0, 4)
  const month = dateStr.substring(4, 6)
  const day = dateStr.substring(6, 8)
  return `${year}-${month}-${day}`
}